<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="../jquery/jquery-3.5.1.min.js"></script>
  <style>
    * {
      margin: 0;
      padding: 0;
    }
    .tabs {
      width: 800px;
      min-height: 500px;
      margin: 50px auto;
    }
    .tabs ul {
      width: 800px;
      height: 30px;
      display: flex;
      justify-content: space-evenly;
      list-style: none;
      margin-bottom: 10px;
    }
    .tabs ul li {
      flex: 1;
      text-align: center;
      line-height: 30px;
    }
    .tabs ul li.st {
      background-color: yellow;
      color: red;
    }
    .tabs .img img {
      display: none;
    }
    .tabs .img img.dis {
      display: block;
    }
  </style>
</head>
<body>
  <div class="tabs">
    <ul>
      <li class="st">图片1</li>
      <li>图片2</li>
      <li>图片3</li>
      <li>图片4</li>
      <li>图片5</li>
    </ul>
    <div class="img">
      <img class="dis" src="https://bbs-fd.zol-img.com.cn/t_s800x5000/g3/M01/04/00/Cg-4V1Dr1OGIZyXhAAD5izSnAG8AAEPmgA2X1oAAPmj860.jpg">
      <img src="http://image.yy.com/yywebalbumbs2bucket/345a67520e2347f5abdb13e343f65cce_1436043535766.jpg">
      <img src="http://www.bizhi360.com/allimg/bpic/34/1134.jpg">
      <img src="http://www.bizhi360.com/allimg/bpic/45/6045.jpg">
      <img src="https://img9.zol.com.cn/dp_800/355/354090.jpg">
    </div>
  </div>
  <script>
    $(function () {
      $('li').on('click', function () {
        $(this).addClass('st').siblings().removeClass('st');
        $('.img img').eq($(this).index()).addClass('dis').siblings().removeClass('dis');
      })
    })
  </script>
</body>
</html>